-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not panic when passed an invalid bootnode address #2207
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.
twiggy diff reportDifference in .wasm size before and after this pull request.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bin/light-base/src/lib.rs
Outdated
if let Ok(multiaddr) = multiaddr.parse::<multiaddr::Multiaddr>() { | ||
let peer_id = peer_id::PeerId::from_bytes(peer_id).unwrap(); | ||
valid_list.push((peer_id, vec![multiaddr])); | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need continue
here?
Close #2204
We no longer panic when the chain spec contains an invalid bootnode address.
As I've commented in the code, it is not possible to be sure that a bootnode address is actually invalid. We can only be sure that smoldot cannot parse it, but that's not the same as saying that it's invalid.
For this reason, invalid bootnode addresses are simply ignored in the light client.